import request from '@utils/request';
import { service } from '@utils/service'

export async function getMicroList(params:any) {
  return request(`${service.SERVICE_ROOT}/micro/list`,{
    method: 'POST',
    data: {
      ...params,
    },
  })
}

export async function updateMicro(params:any) {
  return request(`${service.SERVICE_ROOT}/micro/update`,{
    method: 'PUT',
    data: {
      ...params,
    },
  })
}

export async function deleteMicro(params:any) {
  return request(`${service.SERVICE_ROOT}/micro/delete`,{
    method: 'DELETE',
    data: {
      ...params,
    },
  })
}

export async function addMicro(params:any) {
  return request(`${service.SERVICE_ROOT}/micro/add`,{
    method: 'POST',
    data: {
      ...params,
    },
  })
}
